
import request from '@/utils/request';
export const getDangerousRuleList = (data: any) => {
  // 处理数组参数，将数组转换为字符串
  const processedData = { ...data };
  return request({
    url: `/dangerousRule/list`,
    method: 'get',
    params: processedData,
  });
};
export const getScriptType = () => {
  return request({
    url: `/enum/scriptType`,
    method: 'get',
  });
};
export const getAction = () => {
  return request({
    url: `/enum/ruleAction`,
    method: 'get',
  });
};
export const dangerousRuleAdd = (data: any) => {
  return request({
    url: `/dangerousRule/add`,
    method: 'post',
    data: data,
  });
};
export const dangerousRuleUpdate = (data: any) => {
  return request({
    url: `/dangerousRule/update`,
    method: 'put',
    data: data,
  });
};

export const dangerousRuleDelete = (data: any) => {
  return request({
    url: `/dangerousRule/delete`,
    method: 'delete',
    data: data,
  });
};
export const dangerousRuleChangeStatus = (data: any) => {
  return request({
    url: `/dangerousRule/changeStatus`,
    method: 'put',
    data: data,
  });
};
